/**
 * @Description: 不需要定位错误点的提示信息装饰器
 * @author Beon
 * @date 2021/6/28
*/
export interface DropError {
	(errMsg: string):void
}
export default class ErrorMsg{

    /**
     * 拖动的公共报错
     * @param baseName
     * @returns {(target: any, propertyKey: (string | symbol)) => void}
     */
    static dropError(baseName:string): PropertyDecorator {
        return (target: any, propertyKey: string | symbol): void => {
            target[propertyKey] = (errMsg: string): void => {
                console.error(`id为：${target.id},名称为：${target.display}的${baseName}出现问题：${errMsg}`);
            };
        };
    }
}
